unit uTeacherImpl;

interface

type

  ITeacher = interface
  ['{F6902B0A-0BF4-4CA7-BAF1-173C6FEF92CF}']
    function GetLogin: WideString;
    procedure SetLogin(Value: WideString);
    function GetPassword: WideString;
    procedure SetPassword(Value: WideString);
    function GetName: WideString;
    procedure SetName(Value: WideString);
    function GetSurname: WideString;
    procedure SetSurname(Value: WideString);
    function GetCathedra: WideString;
    procedure SetCathedra(Value: WideString);
    function GetEmail: WideString;
    procedure SetEmail(Value: WideString);
    function GetPosition: WideString;
    procedure SetPosition(Value: WideString);

    property Login: WideString read GetLogin write SetLogin;
    property Password: WideString read GetPassword write SetPassword;
    property Name: WideString read GetName write SetName;
    property Surname: WideString read GetSurname write SetSurname;
    property Cathedra: WideString read GetCathedra write SetCathedra;
    property Email: WideString read GetEmail write SetEmail;
    property Position: WideString read GetPosition write SetPosition;
  end;

  TTeacher = class(TInterfacedObject, ITeacher)
  private
    fLogin: WideString;
    fPassword: WideString;
    fName: WideString;
    fSurname: WideString;
    fCathedra: WideString;
    fEmail: WideString;
    fPosition: WideString;
  protected
    function GetLogin: WideString;
    procedure SetLogin(Value: WideString);
    function GetPassword: WideString;
    procedure SetPassword(Value: WideString);
    function GetName: WideString;
    procedure SetName(Value: WideString);
    function GetSurname: WideString;
    procedure SetSurname(Value: WideString);
    function GetCathedra: WideString;
    procedure SetCathedra(Value: WideString);
    function GetEmail: WideString;
    procedure SetEmail(Value: WideString);
    function GetPosition: WideString;
    procedure SetPosition(Value: WideString);
  end;

  function NewTeacher(aLogin: WideString = ''): ITeacher;

implementation

function NewTeacher(aLogin: WideString = ''): ITeacher;
begin
  Result := TTeacher.Create;
  Result.Login := aLogin;
end;

{ TTeacher }

function TTeacher.GetCathedra: WideString;
begin
  Result := fCathedra;
end;

function TTeacher.GetEmail: WideString;
begin
  Result := fEmail;
end;

function TTeacher.GetLogin: WideString;
begin
  Result := fLogin;
end;

function TTeacher.GetName: WideString;
begin
  Result := fName;
end;

function TTeacher.GetPassword: WideString;
begin
  Result := fPassword;
end;

function TTeacher.GetPosition: WideString;
begin
  Result := fPosition;
end;

function TTeacher.GetSurname: WideString;
begin
  Result := fSurname;
end;

procedure TTeacher.SetCathedra(Value: WideString);
begin
  fCathedra := Value;
end;

procedure TTeacher.SetEmail(Value: WideString);
begin
  fEmail := Value;
end;

procedure TTeacher.SetLogin(Value: WideString);
begin
  fLogin := Value;
end;

procedure TTeacher.SetName(Value: WideString);
begin
  fName := Value;
end;

procedure TTeacher.SetPassword(Value: WideString);
begin
  fPassword := Value;
end;

procedure TTeacher.SetPosition(Value: WideString);
begin
  fPosition := Value;
end;

procedure TTeacher.SetSurname(Value: WideString);
begin
  fSurname := Value;
end;

end.
